﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OA.Core.Model;
using OA.Core.Other;
using OA.Model.Api;

namespace OA.Model.Result
{

     
    public class DetailResult : BaseResult
    { 
        public string Title { get; set; }

        public List<DetailItem> Items { get; set; }

        public List<TableContent> Tables { get; set; }

        public List<ApprovalItem> ApprovalItems { get; set; }

        /// <summary>
        /// 选择卡个数
        /// </summary>
        public int TabCount { get; set; }

        public int ColumnCount { get; set; }

        public int RowCount { get; set; }

        public bool IsApproval { get; set; } = false;

        /// <summary>
        /// 是否可以发起审批
        /// </summary>
        public bool AbleSponsor { get; set; } = false;

        public string ApprovalEmpID { get; set; }

        public List<DepartmentInfoResult> Departments { get; set; }

        public Dictionary<int, List<PositionInfo>> Positions { get; set; }

        public Dictionary<int, List<EmployeeInfo>> EmployeeInfo { get; set; }

        public int MaxDepth { get; set; }

        /// <summary>
        /// 下拉选择数据源
        /// </summary>
        public Dictionary<string, List<MySelectItem>> DicDataScore { get; set; }


    }
 
    public class TableContent
    {
        public string Name { get; set; }

        public string Data { get; set; }

        /// <summary>
        /// 图片高度
        /// </summary>
        public int ImageHeight { get; set; }

        /// <summary>
        /// 图片宽度
        /// </summary>
        public int ImageWidth { get; set; }
    }


    public class DetailItem
    {
        public DetailItem()
        {

        }
        public DetailItem(string name,string value, string text, string key, int type=0,int status=0)
        {
            this.Name = name;
            this.Value = value;
            this.Key = key;
            this.Type = type;
            this.Status = status;
            this.Text = text;
        }

        public DetailItem(string name, string value, string key, int type = 0, int status = 0)
        {
            this.Name = name;
            this.Value = value;
            this.Key = key;
            this.Type = type;
            this.Status = status;
            this.Text = value;
        }

        public int Type { get; set; }

        public string Name { get; set; }

        public string Value { get; set; }

        public string Text { get; set; }

        public string Key { get; set; }

        /// <summary>
        /// 文件
        /// </summary>
        public List<string> Files { get; set; }

        /// <summary>
        /// -1 隐私 1 可以编辑
        /// </summary>
        public int Status { get; set; }

         
    }

   

    public class SelectList
    {
        /*
            "id": 11,
           "name": "4",
           "spread": true,
           "children": null
        */

        public int id { get; set; }

        public string name { get; set; }

        public bool spread { get; set; }

        public List<SelectList> children { get; set; }
    }

    public class SelectList2
    {
        /*
            "id": "_a",
           "name": "4",
           "spread": true,
           "children": null
        */

        public string id { get; set; }

        public string name { get; set; }

        public bool spread { get; set; }

        public List<SelectList2> children { get; set; }
    }


   

}
